<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Initialzr Pro</title>
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
</head>
<body>
<form>
    <h1>Aliyun Java Initialzr Pro</h1>
    <table border="1">
        <tr>
            <td align="right">项目构建方式</td>
            <td>
                <input type="radio" name="project" value="maven" checked>Maven
            </td>
        </tr>
        <tr>
            <td align="right">开发语言</td>
            <td>
                <input type="radio" name="language" value="java" checked>Java
            </td>
        </tr>
        <tr>
            <td align="right">SpringBoot版本</td>
            <td>
                <table>
                    <tr>
                        <td>
                            <input type="radio" name="springboot" value="2.3.0" checked>2.3.0 <span class="span-current">CURRENT</span> <span class="span-ga">GA</span>
                        </td>
                        <td>
                            <input type="radio" name="springboot" value="2.3.1">2.3.1 <span class="span-snapshot">SNAPSHOT</span>
                        </td>
                        <td>
                            <input type="radio" name="springboot" value="2.2.8">2.2.8 <span class="span-snapshot">SNAPSHOT</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="radio" name="springboot" value="2.2.7">2.2.7 <span class="span-ga">GA</span>
                        </td>
                        <td>
                            <input type="radio" name="springboot" value="2.1.15">2.1.15 <span class="span-snapshot">SNAPSHOT</span>
                        </td>
                        <td>
                            <input type="radio" name="springboot" value="2.1.14">2.1.14 <span class="span-ga">GA</span>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right">项目元信息</td>
            <td>
                <table>
                    <tr>
                        <td align="right">Group</td>
                        <td>
                            <input type="text" name="groupId" value="com.example">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Artifact</td>
                        <td>
                            <input type="text" name="artifactId" value="demo">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Name</td>
                        <td>
                            <input type="text" name="projectName" value="demo">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Description</td>
                        <td>
                            <input type="text" name="description" value="Demo project for Spring Boot">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Package name</td>
                        <td>
                            <input type="text" name="packageName" value="com.example.demo">
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Packaging</td>
                        <td>
                            <input type="radio" name="packaging" value="jar" checked>Jar
                            <input type="radio" name="packaging" value="war">War
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Java</td>
                        <td>
                            <input type="radio" name="javaVersion" value="8" checked>8
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right">组件依赖</td>
            <td>
                <table>
                    <tr>
                        <td>搜索依赖组件</td>
                        <td>
                            <input type="search" placeholder="Web, Security, JPA, Actuator, Devtools...">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <button onclick="generate()">生成</button>
            </td>
        </tr>
    </table>
</form>
<script>
    function generate() {
        let serialize = $('form').serialize();
        window.open('http://localhost:8080/generate?' + serialize);
    }
</script>
</body>
</html>